.header {
  background-color: #2c3e50;
  color: white;
  padding: 1rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
  flex-wrap: nowrap;
  overflow-x: visible;
  min-width: 0;
  position: relative;
}

.logo {
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  transition: transform 0.2s ease;
  
  &:hover {
    transform: scale(1.02);
  }
}

.avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  overflow: hidden;
  border: 2px solid rgba(255, 255, 255, 0.2);
  transition: border-color 0.2s ease;
  
  &:hover {
    border-color: rgba(255, 255, 255, 0.4);
  }
}

.avatarImg {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.logoText {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.name {
  font-size: 1.1rem;
  font-weight: 600;
  color: white;
  line-height: 1;
}

.subtitle {
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.8);
  line-height: 1;
  white-space: nowrap;
}

.nav {
  display: flex;
  gap: 0.02rem;
  align-items: center;
  min-width: 0;
  flex-wrap: nowrap;
  justify-content: flex-end;
}

.navItem {
  font-size: .9rem;
  display: flex;
  align-items: center;
  white-space: nowrap;
  flex-shrink: 0;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  color: white;
  text-decoration: none;
  border-radius: 4px;
  transition: all 0.2s ease;
  border: none;
  background: none;
  cursor: pointer;
  
  &:hover {
    background-color: rgba(255, 255, 255, 0.1);
    transform: translateY(-1px);
  }
  
  &.active {
    background-color: rgba(255, 255, 255, 0.2);
    font-weight: 500;
  }
}

.dropdown {
  line-height: 1.4rem;
  font-size: 0.9rem;
  position: relative;
}

.dropdownMenu {
  position: absolute;
  top: 100%;
  left: 0;
  background-color: #2c3e50;
  border-radius: 4px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.2);
  padding: 0.5rem 0;
  margin-top: 0.25rem;
  z-index: 100;
  min-width: 120px;
}

.dropdownItem {
  display: block;
  padding: 0.3rem 1rem;
  color: white;
  text-decoration: none;
  transition: all 0.2s ease;
  width: 100%;
  text-align: left;
  white-space: nowrap;
  
  &:hover {
    background-color: rgba(255, 255, 255, 0.1);
  }
  
  &.active {
    background-color: rgba(255, 255, 255, 0.2);
    font-weight: 500;
  }
}

.chevron {
  font-size: 0.8rem;
  transition: transform 0.2s ease;
}

.boldText {
  color: #0863ec;
  font-weight: bold;
}

.navIcon {
  display: flex;
  align-items: center;
  font-size: 1.1rem;
}

.navText {
  font-size: 0.9rem;
}

.searchBox {
  display: flex;
  align-items: center;
  background: rgba(255,255,255,0.08);
  border-radius: 20px;
  padding: 2px 8px 2px 12px;
  margin-left: 24px;
  transition: box-shadow 0.2s;
  box-shadow: 0 1px 4px rgba(0,0,0,0.04);

  &:focus-within {
    box-shadow: 0 2px 8px rgba(66,133,244,0.15);
    background: rgba(255,255,255,0.15);
  }
}

.searchInput {
  border: none;
  background: transparent;
  color: #fff;
  font-size: 1rem;
  outline: none;
  padding: 4px 8px;
  width: 120px;
  transition: width 0.2s;
}

.searchInput::placeholder {
  color: #eee;
  opacity: 0.7;
}

.searchBtn {
  background: none;
  border: none;
  color: #fff;
  font-size: 1.1rem;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 50%;
  transition: background 0.2s;
}

.searchBtn:hover {
  background: rgba(255,255,255,0.15);
}

// 响应式设计
@media (max-width: 768px) {
  .header {
    padding: 1rem;
  }
  
  .navText {
    display: none; // 在小屏幕上只显示图标
  }
  
  .navItem {
    padding: 0.5rem;
  }
  
  .name {
    font-size: 1rem;
  }
  
  .searchBox {
    margin-left: 8px;
    padding: 2px 4px 2px 8px;
  }
  .searchInput {
    width: 70px;
    font-size: 0.9rem;
  }
}
